package controller;


import po.WebResult;
import util.Toolkit;

import com.jfinal.core.Controller;

public class BaseController extends Controller {

	protected Toolkit tk;
	protected String viewPath = "/WEB-INF/view/";
	private WebResult jsonResult;
	public Integer pageSize;
	
	public BaseController() {
		tk = new Toolkit(this);
		pageSize = 16;
	}
	public WebResult getJsonResult () {
	    if (jsonResult == null) {
	        jsonResult = new WebResult();
	    }
	    return jsonResult;
	}
	

	@Override
	public void renderJsp(String f) {
	    setAttr("tk", tk);
	    super.renderJsp(viewPath + f);
	}

}
